<template>
	<view>
		<view style="background-color: #007AFF; height: 250rpx;width: 100%;">
			<text style="display:flex; flex-direction:row; justify-content:center; padding-top: 100rpx; color:#FFFFFF; font-size: large;">普通资源</text>
		</view>
		<uni-grid :column="2" :showBorder="false" :square="false">
			<uni-grid-item >
				<view @click="typeClick(0)" style="border-radius: 18px;border: 2px solid #FFFFFF; background-color: #ff6633; margin: 15rpx;">
					<view style="flex: auto;display: flex;flex-direction: column;ify-content: center;align-items: center;">
						<uni-icons type="videocam-filled" size="45" color="#fff"></uni-icons>
					</view>
					<view style="flex: auto;display: flex;flex-direction: column;ify-content: center;align-items: center;">
						<uni-title title="影视类" type="h4" color="#fff"></uni-title>
					</view>
				</view>
			</uni-grid-item>
			
			<uni-grid-item>
				<view @click="typeClick(1)" style="border-radius: 18px;border: 2px solid #FFFFFF; background-color: #33cc33; margin: 15rpx;">
					<view style="flex: auto;display: flex;flex-direction: column;ify-content: center;align-items: center;">
						<uni-icons type="map" size="45" color="#fff"></uni-icons>
					</view>
					<view  style="flex: auto;display: flex;flex-direction: column;ify-content: center;align-items: center;">
						<uni-title title="书籍类" type="h4" color="#fff"></uni-title>
					</view>
				</view>
			</uni-grid-item>
			
			<uni-grid-item>
				<view @click="typeClick(2)" style="border-radius: 18px;border: 2px solid #FFFFFF; background-color: #cc3333; margin: 15rpx;">
					<view style="flex: auto;display: flex;flex-direction: column;ify-content: center;align-items: center;">
						<uni-icons type="wallet" size="45" color="#fff"></uni-icons>
					</view>
					<view style="flex: auto;display: flex;flex-direction: column;ify-content: center;align-items: center;">
						<uni-title title="工具类" type="h4" color="#fff"></uni-title>
					</view>
				</view>
			</uni-grid-item>
			
			
			
			<uni-grid-item>
				<view @click="typeClick(3)" style="border-radius: 18px;border: 2px solid #FFFFFF; background-color:#ff9900; margin: 15rpx;">
					<view style="flex: auto;display: flex;flex-direction: column;ify-content: center;align-items: center;">
						<uni-icons type="plus" size="45" color="#fff"></uni-icons>
					</view>
					<view style="flex: auto;display: flex;flex-direction: column;ify-content: center;align-items: center;">
						<uni-title title="其他类" type="h4" color="#fff"></uni-title>
					</view>
				</view>
			</uni-grid-item>
			
			
			
		</uni-grid>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				typeList:[
					"影视类","书籍类","工具类","其他类"
				]
			};
		},
		methods:{
			typeClick(type){
				uni.navigateTo({
					url: '/pages/resourcelist/resourcelist?type='+this.typeList[type].toString()
				});
				// uni.redirectTo({
				//  	url: '/pages/resourcelist/resourcelist?type='+this.typeList[type].toString()
				//  })
			}
		}
	}
</script>

<style lang="scss">

</style>
